import request from '@/utils/request'

export function getKnowledgeList() {
  return request({
    url: '/api/agriculture-knowledge',
    method: 'get'
  })
}

export function getKnowledge(id) {
  return request({
    url: `/api/agriculture-knowledge/${id}`,
    method: 'get'
  })
}

export function addKnowledge(data) {
  return request({
    url: '/api/agriculture-knowledge',
    method: 'post',
    data
  })
}

export function updateKnowledge(data) {
  return request({
    url: '/api/agriculture-knowledge',
    method: 'put',
    data
  })
}

export function deleteKnowledge(id) {
  return request({
    url: `/api/agriculture-knowledge/${id}`,
    method: 'delete'
  })
} 